<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello/:name', 'index/hello');
Route::get('/phpinfo', function (){
    echo phpinfo();
});

// user
Route::post('/api/sys_account/list', 'SysAccountController/list');
Route::get('/api/sys_account/getbyid', 'SysAccountController/getbyid');
Route::post('/api/sys_account/update', 'SysAccountController/update');
Route::post('/api/sys_account/add', 'SysAccountController/add');
Route::get('/api/sys_account/delbyid', 'SysAccountController/delbyid');



Route::post('/api/auth/login', 'AuthController/login');
Route::post('/api/auth/unlogin', 'AuthController/unlogin');
Route::get('/api/auth/getuserinfobyauth', 'AuthController/getuserinfobyauth');
Route::post('/api/auth/getmenu', 'AuthController/getmenu');



//app_func
Route::post('/api/app_fun/list', 'AppFunController/list');
Route::get('/api/app_fun/getbyid', 'AppFunController/getbyid');
Route::post('/api/app_fun/update', 'AppFunController/update');
Route::post('/api/app_fun/add', 'AppFunController/add');
Route::get('/api/app_fun/delbyid', 'AppFunController/delbyid');

//字典
Route::post('/api/sys_dictionary/list', 'SysDictionayController/list');
Route::get('/api/sys_dictionary/getbyid', 'SysDictionayController/getbyid');
Route::post('/api/sys_dictionary/update', 'SysDictionayController/update');
Route::post('/api/sys_dictionary/add', 'SysDictionayController/add');
Route::get('/api/sys_dictionary/deletebyid', 'SysDictionayController/deletebyid');
//字典value
Route::post('/api/sys_dictionary/value/list', 'SysDictionayController/valuelist');
Route::get('/api/sys_dictionary/value/getbyid', 'SysDictionayController/valuegetbyid');
Route::post('/api/sys_dictionary/value/update', 'SysDictionayController/valueupdate');
Route::post('/api/sys_dictionary/value/add', 'SysDictionayController/valueadd');
Route::get('/api/sys_dictionary/value/delbyid', 'SysDictionayController/valuedeletebyid');
Route::post('/api/sys_dictionary/value/listbycode', 'SysDictionayController/listbycode');


//分类
Route::post('/api/sys_class/list', 'SysClassController/list');
Route::get('/api/sys_class/delbyid', 'SysClassController/delbyid');
Route::post('/api/sys_class/update', 'SysClassController/update');
Route::post('/api/sys_class/add', 'SysClassController/add');

// sys_department
 Route::post('/api/sys_department/list', 'SysDepartmentController/list');
Route::get('/api/sys_department/getbyid', 'SysDepartmentController/getbyid');
Route::post('/api/sys_department/update', 'SysDepartmentController/update');
Route::post('/api/sys_department/add', 'SysDepartmentController/add');
Route::get('/api/sys_department/delbyid', 'SysDepartmentController/delbyid');
Route::get('/api/sys_department/getAccountUserlistByDepartId', 'SysDepartmentController/getAccountUserlistByDepartId');
Route::get('/api/sys_department/deleteAccountDepartBinding', 'SysDepartmentController/deleteAccountDepartBinding');
Route::post('/api/sys_department/bindAccountListIntoDepart', 'SysDepartmentController/bindAccountListIntoDepart');
Route::post('/api/sys_department/getDepartRoles', 'SysDepartmentController/getDepartRoles');
Route::post('/api/sys_department/bindRolesIntoDepart', 'SysDepartmentController/bindRolesIntoDepart');
Route::post('/api/sys_department/deleteRoleFromDepart', 'SysDepartmentController/deleteRoleFromDepart');




//角色
 Route::post('/api/sys_role/list', 'SysRoleController/list');
Route::get('/api/sys_role/getbyid', 'SysRoleController/getbyid');
Route::post('/api/sys_role/update', 'SysRoleController/update');
Route::post('/api/sys_role/add', 'SysRoleController/add');
Route::get('/api/sys_role/delbyid', 'SysRoleController/delbyid');
Route::post('/api/sys_role/getAllTree', 'SysRoleController/getAllTree');
Route::post('/api/sys_role/bindRoleFun', 'SysRoleController/bindRoleFun');
Route::post('/api/sys_role/getRoleAppFunByRoleId', 'SysRoleController/getRoleAppFunByRoleId');
